package com.kgc.basic.remote;

import com.kgc.basic.pojo.Store;
import com.kgc.basic.pojo.Unit;
import com.kgc.basic.util.ResponseMsg;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

public interface UnitRemote {
    //根据条件查询计量单位信息
    @RequestMapping("getUnitList")
    @ResponseBody
    ResponseMsg getUnitList(@RequestBody Map<String,Object> paramMap);


    @RequestMapping("getAllUnit")
    @ResponseBody
    ResponseMsg getAllUnit();

    //根据id查询计量单位信息
    @RequestMapping("getUnitById")
    @ResponseBody
    ResponseMsg getUnitById(@RequestParam("id") Integer id);

    //根据name查询计量单位信息
    @RequestMapping("getUnitByName")
    @ResponseBody
    ResponseMsg getUnitByName(@RequestParam("name") String name);

    //新增计量单位信息
    @RequestMapping("addUnit")
    @ResponseBody
    ResponseMsg addUnit(@RequestBody Unit unit);

    //更新计量单位信息
    @RequestMapping("modifyUnit")
    @ResponseBody
    ResponseMsg modifyUnit(@RequestBody Unit unit);

    //删除计量单位信息
    @RequestMapping("delUnit")
    @ResponseBody
    ResponseMsg delUnit(@RequestParam("id") Integer id);
}
